<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML >
<html>
<head>
<base href="<%=basePath%>">

<title>头条</title>
<title></title>
<link rel="stylesheet" href="css/style.css" type="text/css"></link>
<link rel="stylesheet" href="layerui/css/layui.css" type="text/css"></link>
<script src="js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
</head>

<body class="bodyimg">
	<div class="total">
		<div class="tex">头条</div>
		<form class="layui-form" action="userInfoAction" method="post">
			<div class="layui-form-item">
				<label class="layui-form-label">用户名</label>
				<div class="layui-input-block">
					<input type="text" style="width: 190px" name="account" id="name" placeholder="请输入账号或手机号码" autocomplete="off" class="layui-input">
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">密码</label>
				<div class="layui-input-inline">
					<input type="password" name="password" id="password" placeholder="请输入密码" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button class="layui-btn" lay-submit lay-filter="formDemo" onclick="return btn()">立即提交</button>
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
				</div>
			</div>
		</form>
	</div>

	<script type="text/javascript">
		function btn() {
			if (document.getElementById("name").value.length == 0) {
				alert("请输入用户名！");
				return false;
			}
			if (document.getElementById("password").value.length == 0) {
				alert("请输入密码！");
				return false;
			}
			
		}
	</script>

</body>

</html>